1. Field of the Invention
The present invention generally relates to computers and software, and more particularly, to differentiation of localized (i.e. internationalized for language including region or dialect, or by profession or industry, including acronyms, etc.) terms utilizing a resource bundle generator.
2. Description of Related Art
As known in the art, localization of a term is a process of altering a program so that it is suitable for the target user. However, localization of programs requires a little more effort and is generally program language specific. The major problem of localization is making the program flexible enough to display messages or other types of user visible text to the target user in the appropriate language for the current locale, dialect or profession. Typically, this means that the program cannot use hard coded messages and must instead read in a set of messages at runtime, based on the locale setting.
In the well known Java programming language developed by Sun Microsystems, Inc., there are packages, i.e., programs created to perform a particular type of work, that are designed to allow a programmer to localize the handling of numbers, dates, times, string comparisons, and so on. A function "number format" is used to convert numbers, monetary amounts, and percentages to the appropriate textual format for a locale. Similarly, the "data format" class, along with "calendar" and "time zone" classes from the Java utility package, are used to display dates and times in a localized specific way. The "collector class" is used to compare strings according to the alphabetization rules of a given locale and the "break iterator" class is used to locate the word, line, and sentence boundaries for that given locale.
The Java programming language also provides an easy way to localize messages by defining messages as key/value pairs in a "Resource Bundle" subclass. The programmer creates a subclass of "Resource Bundle" for each language or locale for which the application supports naming each class following a convention that includes the locale name. At runtime the programmer uses the "ResourceBundle.getBundle( )" method to load the appropriate "Resource Bundle" class for the current locale. The "Resource Bundle" contains the messages the application uses, each associated with a key that served as the message name. Using this technique, the application can look up the localized dependent message translation based on the localized independent message name.
However, a primary difficulty with this localized independent message methodology is the lack of the ability to provide localization of a message that may have more than one definition for conversion, i.e. localization differentiation. An example of this would be to utilize the string "hot" which in English refers to situations for both temperature and taste. A localization for these two different cases in Spanish have two different meanings. The "picante" (taste) and "caliente" (temperature).